// 总结相关方法
import request from "@/utils/request"
import store from "@/store"

const userId = store.state.user.userId

// 查询总结列表
export function listSummary(query) {
    query.userId = userId
    return request({
        url: '/summary/list',
        method: 'GET',
        params: query
    })
}

// 修改总结
export function updateSummary(data) {
    data.userId = userId
    return request({
        url: '/summary/edit',
        method: 'post',
        data: data
    })
}

// 新增
export function insertSummary(data) {
    data.userId = userId
    return request({
        url: '/summary/insert',
        method: 'post',
        data: data
    })
}

// 查询主动写
export function selectNotAuto(category = '') {
    return request({
        url: '/summary/selectNotAuto',
        method: 'get',
        query: category
    })
}

// 查询自动写
export function selectAuto(category = '') {
    return request({
        url: '/summary/selectAuto',
        method: 'get',
        query: category
    })
}